<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue事件的参数传递</title>
</head>
<body>
    <div id="app">
        {{message}}
        {{count}}
        <p>{{user.name}}+{{user.age}}</p>
        <button @click="changeCount(1,'ass',123)">增加1</button>
    </div>
</body>
<script src="./js/vue.js"></script>
<script>
    let app = new Vue({
        el:"#app",
        data:{
            message:"vue事件的参数传递",
            count:0,
            user:{
                name:"11",
                age:"122"
            }
        },methods:{
            changeCount(num,...user){
                this.count += num;
                this.user.name = user[0];
                this.user.age = user[1];
            }
        }
    })
</script>
</html>